package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.cnswhy.cloud.server.common.entity.enumeration.BusType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2021-02-02
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_split_config")
@ApiModel(value = "SplitConfig", description = "")
@AllArgsConstructor
public class SplitConfig extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 业务类型
     */
    @ApiModelProperty(value = "业务类型")
    @Length(max = 32, message = "业务类型长度不能超过32")
    @TableField(value = "bus_type")
    @Excel(name = "业务类型")
    private BusType busType;

    /**
     * 1
     */
    @ApiModelProperty(value = "分成级别")
    @TableField("split_level")
    @Excel(name = "分成级别")
    private Integer splitLevel;

    /**
     * 附加手续费
     */
    @ApiModelProperty(value = "附加手续费")
    @TableField("extern_fee")
    @Excel(name = "附加手续费")
    private Long externFee;

    /**
     * 交易费率
     */
    @ApiModelProperty(value = "交易费率")
    @TableField("fee_rate")
    @Excel(name = "交易费率")
    private Long feeRate;


    @Builder
    public SplitConfig(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long updateUser, Long createUser, 
                    BusType busType, Integer splitLevel, Long externFee, Long feeRate) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.createUser = createUser;
        this.busType = busType;
        this.splitLevel = splitLevel;
        this.externFee = externFee;
        this.feeRate = feeRate;
    }

}
